﻿<%@ Page Language="C#" MasterPageFile="~/Master/ListMasterPage.master" AutoEventWireup="True" Inherits="Web.Column_List" Title="" CodeBehind="List.aspx.cs" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="title_bar">
        <ul class="tab_nav">
            <li id="current_tab"></li>
        </ul>
    </div>
    <div class="search_bar">
        <div style="width: 100%;">
            <div>
                <div class="label_div"></div>
                <div class="inner_div">
                    <asp:TextBox ID="txt_Id" MaxLength="50" CssClass="t_search" runat="server" />
                </div>
                <div class="search_btn_group">
                    <asp:Button ID="searchButton" runat="server" CssClass="btn_Button" OnClick="searchButton_Click" Text="搜索" />
                    <asp:Button ID="AddButton" runat="server" CssClass="btn_Button" OnClientClick="openWinAANew2('Edit.aspx');return false;" Text="添加" />
                </div>
            </div>
        </div>
    </div>
    <div class="tab_box">
        <asp:GridView ID="GridView1" DataKeyNames="Id" CssClass="grid_bd" BorderWidth="0"
            runat="server" AutoGenerateColumns="False" Width="100%" EmptyDataText="没有记录。"
            AllowPaging="True" PageSize="10" AllowSorting="True" OnSorting="GridView1_Sorting"
            OnSorted="GridView1_Sorted" OnRowCommand="GridView1_RowCommand" OnRowDataBound="GridView1_RowDataBound">
            <RowStyle CssClass="grid_item" />
            <AlternatingRowStyle CssClass="grid_alt_item" />
            <HeaderStyle CssClass="" />
            <EmptyDataRowStyle CssClass="grid_empty" />
            <PagerSettings Visible="False" />
            <Columns>
                <asp:BoundField ItemStyle-HorizontalAlign="center" SortExpression="Id" DataField="Id"
                       HeaderText="主键" Visible="True">
                    <HeaderStyle CssClass="gd_center"></HeaderStyle>
                </asp:BoundField>
                <asp:BoundField ItemStyle-HorizontalAlign="center" SortExpression="Title" DataField="Title"
                    HeaderText="栏目名称" Visible="true">
                    <HeaderStyle CssClass="gd_center"></HeaderStyle>
                </asp:BoundField>
                <asp:BoundField ItemStyle-HorizontalAlign="center" SortExpression="Code" DataField="Code"
                    HeaderText="栏目编码,用于排序" Visible="false">
                    <HeaderStyle CssClass="gd_center"></HeaderStyle>
                </asp:BoundField>
                <asp:BoundField ItemStyle-HorizontalAlign="center" SortExpression="ParentId" DataField="ParentId"
                    HeaderText="父栏目" Visible="false">
                    <HeaderStyle CssClass="gd_center"></HeaderStyle>
                </asp:BoundField>
                <asp:BoundField ItemStyle-HorizontalAlign="center" SortExpression="Info" DataField="Info"
                    HeaderText="简要" Visible="false">
                    <HeaderStyle CssClass="gd_center"></HeaderStyle>
                </asp:BoundField>
                <asp:BoundField ItemStyle-HorizontalAlign="center" SortExpression="IsOut" DataField="IsOut"
                    HeaderText="是否是外部链接" Visible="false">
                    <HeaderStyle CssClass="gd_center"></HeaderStyle>
                </asp:BoundField>
                <asp:BoundField ItemStyle-HorizontalAlign="center" SortExpression="OutURL" DataField="OutURL"
                    HeaderText="外部链接" Visible="false">
                    <HeaderStyle CssClass="gd_center"></HeaderStyle>
                </asp:BoundField>
                <asp:BoundField ItemStyle-HorizontalAlign="center" SortExpression="IsReview" DataField="IsReview"
                    HeaderText="是否允许回复" Visible="false">
                    <HeaderStyle CssClass="gd_center"></HeaderStyle>
                </asp:BoundField>
                <asp:BoundField ItemStyle-HorizontalAlign="center" SortExpression="IsPost" DataField="IsPost"
                    HeaderText="" Visible="false">
                    <HeaderStyle CssClass="gd_center"></HeaderStyle>
                </asp:BoundField>
                <asp:BoundField ItemStyle-HorizontalAlign="center" SortExpression="IsTop" DataField="IsTop"
                    HeaderText="是否置顶" Visible="false">
                    <HeaderStyle CssClass="gd_center"></HeaderStyle>
                </asp:BoundField>
                <asp:BoundField ItemStyle-HorizontalAlign="center" SortExpression="TemplateId" DataField="TemplateId"
                    HeaderText="模板id" Visible="false">
                    <HeaderStyle CssClass="gd_center"></HeaderStyle>
                </asp:BoundField>
                <asp:BoundField ItemStyle-HorizontalAlign="center" SortExpression="ContentTemp" DataField="ContentTemp"
                    HeaderText="内容模板id" Visible="false">
                    <HeaderStyle CssClass="gd_center"></HeaderStyle>
                </asp:BoundField>
                <asp:BoundField ItemStyle-HorizontalAlign="center" SortExpression="PageSize" DataField="PageSize"
                    HeaderText="每页显示的数目" Visible="false">
                    <HeaderStyle CssClass="gd_center"></HeaderStyle>
                </asp:BoundField>
                <asp:TemplateField HeaderText="编辑" ItemStyle-HorizontalAlign="Center">
                    <HeaderStyle Width="40px" CssClass="gd_center"></HeaderStyle>
                    <ItemTemplate>
                        <a href="Edit.aspx?ID=<%# Eval("Id") %>" onclick="openWinAANew2('Edit.aspx?id=<%# Eval("Id") %>');return false;"><img src="../@Images/Button/edit.gif" alt="编辑" title="编辑"/></a>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="删除" ItemStyle-HorizontalAlign="Center" Visible="true">
                    <HeaderStyle Width="40px" CssClass="gd_center"></HeaderStyle>
                    <ItemTemplate>
                        <asp:ImageButton ID="DeleteLink" CommandName="DeleteIt" CommandArgument='<%# Eval("Id") %>'
                            ImageUrl="~/@Images/Button/del.gif" runat="server" OnClientClick="return confirm('确定要删除此项？');" ></asp:ImageButton>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
    </div>
    <div class="grid_ft">
        <div id="pagerDiv" runat="server">
            <webdiyer:AspNetPager ID="AspNetPager1" runat="server" HorizontalAlign="Left" OnPageChanging="AspNetPager1_PageChanging"
                PageSize="10" ShowPageIndex="True" UrlPageIndexName="img" UrlPaging="False" Width="780px"
                PagingButtonType="Text" ImagePath="../@Images/Pager/" ButtonImageNameExtension="n"
                ButtonImageExtension=".gif" DisabledButtonImageNameExtension="g" PagingButtonSpacing="8px"
                ShowCustomInfoSection="Left" CustomInfoHTML="记录总数：%RecordCount% &nbsp;当前页：<font color='red'>%currentPageIndex%</font> &nbsp;总页数：%pageCount%"
                EnableTheming="True" CustomInfoSectionWidth="35%" FirstPageText="首页" LastPageText="末页"
                NextPageText="下一页" PrevPageText="上一页" AlwaysShow="True" SubmitButtonText="跳转"
                SubmitButtonClass="btn_clear">
            </webdiyer:AspNetPager>
        </div>
    </div>
</asp:Content>
                

